package com.zbl.springdemo.controller;

import com.zbl.springdemo.config.annotation.DynamicParam;
import com.zbl.springdemo.model.Person;
import jakarta.websocket.server.PathParam;
import org.springframework.web.bind.annotation.*;

@RestController
public class DemoController {
    @DynamicParam(key = "#msg")
    @GetMapping("hello/{msg}")
    public String hello(@PathVariable("msg") String msg) {
        return "hello" + msg;
    }

    @DynamicParam(key = "#msg")
    @PostMapping("hello")
    public String hello2(@RequestBody Person person) {
        return "hello";
    }
}
